//
//  main.m
//  object本质
//
//  Created by 崔博 on 2018/6/25.
//  Copyright © 2018年 崔博. All rights reserved.
//

struct NSObject_IMPL {
    Class isa;
};
#import <Foundation/Foundation.h>
#import <objc/runtime.h>

@interface Person : NSObject<NSCoding>
{
@public
    int _no;
    int _age;
}

@property (nonatomic, assign) NSInteger score;
//struct Student_IMPL {
//    struct NSObject_IMPL NSObject_IVARS;
//    int _no;
//    int _age;
//};
- (void)personMethod;
+ (void)personClassMethod;
@end

@implementation Person

@end
@interface Student : Person
{
    @public
    int _name;
    int _sex;
}
- (void)studentMethod;
+ (void)studentClassMethod;
//struct Student_IMPL {
//    struct NSObject_IMPL NSObject_IVARS;
//    int _no;
//    int _age;
//};
@end

@implementation Student

@end

int main(int argc, const char * argv[]) {
    @autoreleasepool {
        Student * stu = [[Student alloc] init];
        [stu studentMethod];
        stu->_no = 4;
        stu->_age = 8;
        NSLog(@"%p",stu);
        NSLog(@"%zd  %zd",class_getInstanceSize([NSObject class]),class_getInstanceSize([Student class]));
        
    }
    return 0;
}
